package cn.com.cabinet.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cabinet.web.entity.Seller;

import cn.com.cabinet.dao.SellerDao;

@Service
public class SellerServiceImpl {
	@Autowired
	private SellerDao sellerDao;
	
	public List<Seller> getSellerApplication(int sMark,int page,int limit){
		return sellerDao.getSellerApplication(sMark, page, limit);
		
	}
	
	public int getSellerApplicationCount(int sMark){
		return sellerDao.getSellerApplicationCount(sMark).size();
		
	}
	
	public Seller getSellerApplicationById(Long id){
		return sellerDao.findOne(id);
		
	}
	
	public Seller saueOrUpdateSellerApplicationById(Seller s){
		return sellerDao.save(s);
		
	}
	

}
